package com.jrx.anytxn.reporting.job.xib.step;

import com.jrx.anytxn.reporting.entity.TlFreeInterestTable;
import com.jrx.anytxn.reporting.mapper.base.TlFreeInterestTableMapper;
import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @comment: 免息成本报表Writer
 * @author: liuzb
 * @date: 2021/9/22 15:00
 */
@Service
public class FreeInterestReportingWriter implements ItemWriter<TlFreeInterestTable> {

    @Resource
    TlFreeInterestTableMapper tlFreeInterestTableMapper;

    @Override
    public void write(List<? extends TlFreeInterestTable> list) throws Exception {
        for (TlFreeInterestTable item : list) {
            tlFreeInterestTableMapper.insertSelective(item);
        }
    }

}
